package edu.cqie.smartfarm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author yyw
 * @since 2024-12-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dictionary_data")
@ApiModel(value="DictionaryData对象", description="")
public class DictionaryData implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "字典数据唯一标识符，自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "字典列表ID，逻辑外键，指向DictionaryList表中的id字段，表示该条目所属的字典类别，非空")
    private Integer dictionaryListId;

    @ApiModelProperty(value = "值，字符串类型，表示字典项的实际值，如“牛”、“羊”，非空")
    private String value;

    @ApiModelProperty(value = "状态，布尔值（0或1），1代表启用，0代表停用，默认为启用状态")
    private Integer status;

    @ApiModelProperty(value = "创建时间，自动设置为记录创建的时间戳")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间，当记录被修改时自动更新为此时间戳")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;


}
